const fs=require('fs')
const repfunc=require('./repfunc')

const argv=process.argv
console.log('待替换文件',argv[2])

let filePos=argv[2]
let toReplaceText=fs.readFileSync(filePos,'utf8')
let okText=repfunc(toReplaceText)

fs.writeFileSync(filePos,okText,{
  encoding:'utf8'
})